<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<title> Visitor Register </title>
<meta http-equiv="Content-Type" cotent="text/html;charset=utf-8">
<script type="text/javascript" src="holamundo.js"></script>
<link rel="stylesheet" type="text/css" href="css/Style.css" />
<link href='http://fonts.googleapis.com/css?family=Lily+Script+One' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Rock+Salt' rel='stylesheet' type='text/css'>
</head>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
int isAdmin = 0;
String visitorName=null;
Cookie cookie= null;
Cookie[] cookies=request.getCookies();
if(cookies!=null){
	for(int i=0; i<cookies.length; i++){
		cookie=cookies[i];
		if(cookie.getName().compareTo("user")==0)
		visitorName=cookie.getValue();
	}
}
%>
<c:set var="userName" value="<%= visitorName%>"></c:set>

<body>

<header class="cabecera">

<div class="image">

	<img src="Images/Skyline.png" alt="Mi titulo de la imagen">

	

	<div class="login"> 
		<img src="Images/icon.png" alt="icono">
		<a href="login.htm">LogIn</a> / <a href="visitorRegister.htm">SignIn</a>
	</div>
</div>




<!-- Menu -->
<nav class="nav"> 
	<ul class="menu">
		<c:if test="${userName!=null}">
		<li><a href="index2.htm"> Home</a></li>
		</c:if>
		<c:if test="${userName==null}">
		<li><a href="index.htm"> Home</a></li>
		</c:if>
		<li><a href="#"> North Town</a>
			<ul>
				<li><a href="museum.htm"> Museum</a></li>
				<li><a href="theater.htm"> Theater</a></li>
				<li><a href="stadium.htm"> Stadium</a></li>
				<li><a href="business.htm"> Business</a></li>
			</ul>
		</li>
		<li><a href="#"> South Town</a>
			<ul>
				<li><a href="park.htm"> Park</a></li>
				<li><a href="zoo.htm"> Zoo</a></li>
				<li><a href="attractions.htm"> Attractions</a></li>
				<li><a href="markets.htm"> Markets</a></li>
			</ul>
		</li>
		<c:if test="${userName!=null}">
		<li><a href="show_events.htm"> Events</a></li>
		</c:if>
		<c:if test="${userName==null}">
		<li><a href="login.htm"> Events</a></li>
		</c:if>
	</ul>
 </nav>

</header>

<div class="Container">
	<h2> Visitor Register</h2>

<div id="marcoForm">
	<form action="visitor_Register.htm" method="post" name="form">
		<label for="nombre" > First Name*:</label>
		<input type="text" name="nombre" id= "nombre" placeholder="between 1-30 characters" minlength="1" maxlength="30" tabindex="1" required/> 
		<br>
		<br>
		<label for="apell"> Last Name*:</label>
		<input type="text" name="apell" id= "apell" placeholder="between 1-30 characters" minlength="1" maxlength="30"  tabindex="2" required/> 
		<br>
		<br>
		<label for="visitor"> VisitorName*:</label>
		<input type="text" name="visitor" id= "visitor" placeholder="between 6-12 characters" minlength="6" maxlength="12"  tabindex="3" required/> 
		<br>
		<br>
		<label for="email"> Email*:</label>
		<input type="email" name="email" id= "email" placeholder="between 3-200 characters" minlength="3" maxlength="200"  tabindex="6"  required/> 
		<br>
		<br>
		<label  for="dni"> DNI*:</label>
		<input type="text" name="dni" id= "dni" placeholder="00.000.000-X" minlength="12" maxlength="12"  tabindex="7" pattern="[0-9]{2}[.]{1}[0-9]{3}[.]{1}[0-9]{3}[-]{1}[A-Z]{1}" required/> 
		<br>
		<br>
		<label for="phone"> Number Phone*:</label>
		<input type="text" name="phone" id= "phone" placeholder="between 10-20 characters" minlength="10" maxlength="20"  tabindex="8" required/> 
		<br>
		<br>
		<label for="adress"> Address:</label>
		<input type="text" name="adress" id= "adress" placeholder="between 0-30 characters" minlength="0" maxlength="30"  tabindex="8" required/>
		<label> Optional</label>
		<br>
		<br>
		<label for="pass1" > Password*:</label>
		<input type="password" name="pass1" id= "pass1" placeholder="between 6-15 characters" minlength="6" maxlength="15"  tabindex="4" required/> 
		<br>
		<br>
		<label for="pass2"> Confirm Password*:</label>
		<input type="password" name="pass2" id= "pass2" placeholder="repeat Password" minlength="6" maxlength="15"  tabindex="5" onblur="compara();" required/> 
		<br>
		<br>

<input type="submit" value="Save" onclick="compara()">
	</form>
</div>
	
</div>

<footer> Copyright @ 2015 All rights reserved </footer>

</body>

</html>